import React from 'react';
import {DeviceEventEmitter, View} from "react-native";
import {EChatIMSDK} from "../libs/sdk/echatim/core/sdk/EChatIMSDK";
import SessionListView from "../components/listview/SessionListView";
import TitleView from "../components/title/TitleView";
import {BroadcastEvent} from "../events/BroadcastEvent";


export default class SessionPage extends React.Component  {
    constructor(props:any) {
        super(props);
        DeviceEventEmitter.addListener(BroadcastEvent.EVENT_SDK_INIT, this.onSDKInit.bind(this));
    }

    onSDKInit(im:EChatIMSDK){
        console.log('SessionPage onSDKInit');
    }

    componentDidMount(): void {
        console.log('SessionPage componentDidMount');

    }



    render() {
        return (
            <View style={{flex:1}}>
                <TitleView title={'最近会话'} />
                <SessionListView />
            </View>
        );
    }
}
